#include<stdio.h>

int main()
{
	    int arr1[3] = {0};
		int arr2[3] = {0};
		int arr3[3] = {0};
	int i = 0;
	for(i = 0; i<3;i++)
	{
		scanf("%d",&arr1[i]);
     }
	for(i = 0;i <3;i++)
	{
		scanf("%d",&arr2[i]); 
	}
	for(i = 0;i <3;i++)
	{
		scanf("%d",&arr3[i]);
	}
	printf("%d %d",arr1[0]+arr2[1]+arr3[2],arr1[2]+arr2[1]+arr3[0]);
	
	return 0;
}
